
package com.xesj.util;


public class PageCtrl
{
	private int pageSize;
    private int pageNo;
    private int allCount;
    private int pageCount;
    private int rowCount;
    private int start;
    private int end;
    
    private static final int _default_pageSize = 10;
    
    
    public PageCtrl()
    {
    }

    public int getPageSize()
    {
        if(pageSize <= 0)
            return _default_pageSize;
        else
            return pageSize;
    }

    public void setPageSize(int i)
    {
        pageSize = i;
    }

    public int getPageNo()
    {
        if(pageNo <= 0)
            return 1;
        else
            return pageNo;
    }

    public void setPageNo(int i)
    {
        pageNo = i;
    }

    public int getAllCount()
    {
        return allCount;
    }

    public void setAllCount(int i)
    {
        allCount = i;
    }

    public int getPageCount()
    {
        return pageCount;
    }

    public void setPageCount(int i)
    {
        pageCount = i;
    }

    public int getRowCount()
    {
        return rowCount;
    }

    public void setRowCount(int i)
    {
        rowCount = i;
    }

    public boolean isNext()
    {
        return pageCount > 1 && pageNo < pageCount;
    }

    public boolean isFornt()
    {
        return pageCount > 1 && pageNo > 1;
    }

    public boolean isFirst()
    {
        return pageCount > 1 && pageNo > 1;
    }

    public boolean isLast()
    {
        return pageCount > 1 && pageNo != pageCount;
    }

	public int getStart() {
		return start;
	}

	public void setStart(int start) {
		this.start = start;
	}

	public int getEnd() {
		return end;
	}

	public void setEnd(int end) {
		this.end = end;
	}

    
}
